package com.mlyol.singleton;

public class Demo8 {
    public static void main(String[] args) {
        Singleton instance = Singleton.instance;
        Singleton instance2 = Singleton.instance;
        System.out.println(instance == instance2);
    }

    enum Singleton {
        instance;

        void sayHi() {
            System.out.println("hello");
        }
    }


}
